package com.hd123.rumba.qt.html;

import java.io.IOException;
import java.io.PrintStream;

import javax.servlet.jsp.JspWriter;

public class MyWriter {
  JspWriter jw = null;
  PrintStream pw = null;

  public MyWriter(JspWriter w) {
    jw = w;
  }

  public MyWriter(PrintStream w) {
    pw = w;
  }

  public void print(String s) throws IOException {
    if (jw != null)
      jw.print(s);
    else
      pw.print(s);
  }

  public void println(String s) throws IOException {
    if (jw != null)
      jw.println(s);
    else
      pw.println(s);
  }
}
